window.lpTag=window.lpTag||{},lpTag.taglets=lpTag.taglets||{},lpTag.taglets.lpAnimate={_V:"1.2",name:"lpAnimate",elements:{},queue:{},conf:{interval:13,duration:500,easing:"swing"},init:function(a){if(a)for(var b=0;b=d.startTime+d.options.duration){for(d.relPos=d.relTime=1,c=0;c0){var e=this.queue[b].splice(0,1);this.animate(e[0].domElement,e[0].props,e[0].options)}else this._removeFromQueue(b)},_addToQueue:function(a,b){"undefined"==typeof this.queue[a]&&(this.queue[a]=[]),this.queue[a].push(b)},_removeFromQueue:function(a){"undefined"!=typeof this.queue[a]&&null!=this.queue[a]&&delete this.queue[a]}},window.lpTag=window.lpTag||{},lpTag.taglets=lpTag.taglets||{},lpTag.taglets.lpJsonToDom=function(){function a(a,c,d,e,f){var g=document.createElement(a);e.isSubContainer="undefined"==typeof e.isSubContainer?!1:e.isSubContainer,f||(f=r(c)),b(g,e,d,c,f,a);var h=s(c,e);return""!==h&&(g.className=h),u(g,e.css,c),g}function b(a,b,c,d,e,f){if(c=c||{},c.id=e,"img"===f&&(b.alt?c.alt=b.alt:c.alt=""),b.attrs)for(var g in b.attrs)b.attrs.hasOwnProperty(g)&&(a.setAttribute(g,b.attrs[g]),"data-lp-channel"===g&&(b.css=b.css||{},b.css.cursor="pointer"));for(var h in c)c.hasOwnProperty(h)&&a.setAttribute(h,c[h])}function c(a){a=i(a),a=h(a);var b=q(a);return w(b)}function d(a,b,c,d){y=c;var h=[];if("undefined"==typeof a||null==a)throw lpTag.log("lpJsonToDom, invalid jsons","ERROR","JSON2DOM"),new Error("invalid data exception");for(var i in a){var j=a[i];if("undefined"==typeof j||null==j)throw lpTag.log("lpJsonToDom, bad value","ERROR","JSON2DOM"),new Error("invalid data exception");"undefined"==typeof j.length&&(j=[j]);for(var k=0;kd?1:d>c?-1:0}function g(a,b,c){if(c){var d,e=b.events;if("undefined"!=typeof e&&null!=e&&"object"==typeof e&&lpTag.taglets.utils)for(var f in e)d=c[e[f]],d&&lpTag.taglets.utils.attachEvent(a,f,d.callback,d.context)}}function h(a){return a.replace(/\r\n|\r|\n/g,"
")}function i(a){var b,c,d=[];if("undefined"==typeof y)return a;if("undefined"==typeof y.length)return a;for(var e=0;eb?"&#x"+b.toString(16)+";":a[d];return c}function r(a){var b="LPM"+a+"-"+t()+"-"+E;return E++,b}function s(a,b){var c="undefined"==typeof b.isSubContainer?!1:b.isSubContainer,d="undefined"==typeof b.engagementType?"":b.engagementType,e="";return c||(e="LPM"+a,""!==d&&(e=e+" "+d)),e}function t(){return(new Date).getTime()}function u(a,b,c){j(a,z.base),j(a,z[c]),j(a,b)}function v(a){return"undefined"!=typeof lpTag.taglets.utils?lpTag.taglets.utils.checkHttps(a):void 0}function w(a){return a.replace(/<br />/g,"
")}function x(a){var b,c,d=a.attributes;if(d)for(b=d.length-1;b>=0;b-=1)c=d[b].name,"function"==typeof a[c]&&(a[c]=null);var e=a.childNodes;if(e)for(b=0;b=1&&a.heading<=6?F.heading(a):F.text(a,"label")},images:function(b,c){if("undefined"==typeof b.imageUrl||null===b.imageUrl||""===b.imageUrl)throw lpTag.log("lpJsonToDom, bad imageUrl :"+b.imageUrl,"ERROR","JSON2DOM"),new Error("invalid data exception");"peel"!==c&&"closeButton"!==c&&"slideOutPin"!==c&&(c="image");var d=v(b.imageUrl),e={src:d};return a("img",c,e,b,null)},buttons:function(a){return a.isClickable=!0,F.text(a,"button")},closeButtons:function(a,b){a.isClickable=!0;var c=F.images(a,"closeButton");return c.setAttribute("data-LP-event","close"),c},peels:function(a){var b=F.containers(a),c=F.images(a,"peel");return b.appendChild(c),b},iframes:function(b){var c=r();return a("iframe","iframe",{name:c,frameBorder:0,height:b.css.height,width:b.css.width,scrolling:"no",marginheight:0,marginwidth:0,allowTransparency:!0},b,c)},slideOutPins:function(a){return delete a.alt,F.images(a,"slideOutPin")}};return{version:"1.4",name:"lpJsonToDom",init:function(){},convert:d,purge:x}}(),function(a){a.lpTag=a.lpTag||{},lpTag.taglets=lpTag.taglets||{};var b={SPACE:32,ENTER:13};lpTag.taglets.utils={_V:"1.3",name:"utils",init:function(){},checkHttps:function(a){return"https"==lpTag.protocol&&0!==a.indexOf("https")&&(a="https"+a.substr(4)),a},makeScriptCall:function(a,b){a=this.checkHttps(a);var c=document.createElement("script");c.setAttribute("type","text/javascript"),c.setAttribute("charset",b?b:"UTF-8"),c.setAttribute("src",a);var d=document.getElementsByTagName("head");d&&d.item(0).appendChild(c)},makeImgCall:function(a){a=this.checkHttps(a);var b=new Image;return b.src=a,b},decodeUri:function(a){try{return decodeURIComponent(a)}catch(b){return lpTag.log("err decoding string: "+a+"["+b+"]","ERROR","utils"),a}},isEmptyObj:function(a){for(var b in a)return!1;return!0},arrToObject:function(a){for(var b={},c=0;cd?setTimeout(function(){d++,lpTag.log("Waiting for document.body. try: ("+d+"), time: ("+(new Date).getTime()+")","DEBUG",this.name),e.waitForDocumentBody(b,c,d)},50):lpTag.log("call callback on waitForDocumentBody failed. document.body not exist ","ERROR",this.name)}},isQuirksMode:function(){return document.documentMode&&5==document.documentMode||"BackCompat"==document.compatMode?(lpTag.log("Quirks Mode == true","DEBUG","utils"),!0):(lpTag.log("Quirks Mode == false","DEBUG","utils"),!1)},getPageDimensions:function(){for(var b={totalHeight:null,totalWidth:null,windowHeight:null,windowWidth:null,verticalScroll:null,horizontalScroll:null},c=["Height","Width"],d=0;d0&&"function"==typeof a&&(d=setTimeout(function(){a.call(b)},1e3*c)),d},clearTimeout:function(a){a&&clearTimeout(a)},getCdnGallery:function(a){return a=a.replace(/\{galleryBasePath\}/g,lpTag.protocol+"//"+lpTag.csds.getDomain("leCdnDomain")+"/gallery")},createDom:function(a,b){if(b&&"string"==typeof a){for(var c in b)a=a.replace("{{"+c+"}}",b[c]);var d=document.createElement("div");return d.innerHTML=a,d.firstChild}},isActivationKeyCode:function(a){return a===b.ENTER||a===b.SPACE},attachEvent:function(a,b,c,d){function e(a){try{c.call(f,a)}catch(b){lpTag.log("Error occur on attachEvent run callback","ERROR","utils")}}var f=d;a&&b&&"function"==typeof c&&(a.addEventListener?a.addEventListener(b,e,!1):a.attachEvent("on"+b,e))}}}(window),window.lpTag=window.lpTag||{},lpTag.taglets=lpTag.taglets||{},lpTag.taglets.baseOffer=function(){},function(a){function b(){return this.conf.channel===this.CHANNELS.CHAT}function c(a,b){var c=p(t.CLICK,a,b);n.call(this,c)}function d(){var a=C.LEGACY,c="external app";return b.call(this)&&(this.conf.windowConf=this.conf.windowConf||{},this.conf.windowConf.json=this.conf.windowConf.json||{},this.conf.windowConf.type===c&&this.conf.windowConf.json.externalConfiguration?a=C.CUSTOM:A&&"function"==typeof A.clicked&&(a=C.UNIFIED_WINDOW)),a}function e(){var a={};return b.call(this)?(a.env="",a.domain=lpTag.csds.getDomain(w.CHAT),a.params=y,a.target=(z+lpTag.site).replace(/[^a-z0-9]/gi,"_"),("hc1"===a.domain||"hc1.dev.lprnd.net"===a.domain)&&(a.domain="hc1.dev.lprnd.net",a.env="qa")):(a.params=x,a.target=k.call(this).target),a}function f(a,b,c,e,f){var i=d.call(this,b);C.CUSTOM===i?g.call(this,a,b,c,e):C.UNIFIED_WINDOW===i?h.call(this,a,b,c,e,f):l.call(this,a,b,c,e)}function g(a,b,d,e){var f=this,g={configuration:this.conf.windowConf.json.externalConfiguration,args:B.getClickObject(a,b,d),errorCallback:function(){f.errorLog("Error while opening an external channel")}};try{lpTag.taglets.lpUtil.runCallbackByObject(g.configuration,g.args,g.errorCallback),c.call(this,a,e)}catch(h){this.errorLog("Exception while opening an external channel: "+h.message)}}function h(a,b,d,e,f){f?A.startFlow(B.getClickObject(a,b,d)):(A.clicked(B.getClickObject(a,b,d)),c.call(this,a,e))}function i(a,b){lpTag.log(a+". offer: "+this.engData.tglName+". offerId="+this.offerId,b,s)}function j(a){var b=this.conf.displayInstances||[];return b[a]||{_isInvalid:!0}}function k(){var a={target:"",url:""},b=j.call(this,this.engData.state);return b._isInvalid?a:(b.events&&b.events.click&&b.events.click.enabled&&(a.target=b.events.click.target,a.url=b.events.click.url),a)}function l(a,d,e,f){var g=b.call(this)?m.call(this,a,d,e):k.call(this).url;switch(e.target){case"_self":c.call(this,a,f),g&&setTimeout(function(){window.location.href=g},50);break;case"_parent":case"_top":c.call(this,a,f),g&&window.open(g,e.target,e.params);break;default:g&&window.open(g,e.target?e.target:"_blank",e.params),c.call(this,this.engData,f)}}function m(a,b,c){var d="https://"+c.domain+"/hcp/lewindow/index.html?lpNumber="+lpTag.site+"&site="+lpTag.site+"&domain="+c.domain;return c.env&&(d+="&env="+c.env),d=lpTag.taglets.lp_monitoringSDK.appendCtx(d),d+="&scid="+encodeURIComponent(a.contextId),d+="&cid="+encodeURIComponent(a.campaignId),d+="&eid="+encodeURIComponent(a.engagementId),b.skillName&&(d+="&skill="+encodeURIComponent(b.skillName)),b.windowId&&(d+="&lewid="+encodeURIComponent(b.windowId)),b.language&&(d+="&lang="+encodeURIComponent(b.language)),d}function n(a,b){lpTag.sdes&&"function"==typeof lpTag.sdes.send&&a&&(b?lpTag.sdes.push(a):lpTag.sdes.send(a),this.infoLog("Sent SMT event: "+a.type+", campaignID: "+a.campaign+", engagementId: "+a.engId))}function o(a,b,c){var d,e=[],f=q(a,b);if(c){if(f.expanded=c.expanded,f.userInit=c.userInit===!1?!1:!0,Array.isArray(c.actionableItems))for(var g=0;g0)for(var b=0;b0)for(var f=0;f0&&(b=d[0],b.style.width="100%",b.style.height="100%",b=c(b),a.appendChild(b))},p[q].repositionCloseBtn=function(a){var b=a.firstChild.getElementsByClassName("LPMcloseButton")[0];b&&(b=c(b),a.appendChild(a.firstChild.removeChild(b)))},p[q].createEventCallbacks=function(a){var b=this,c=a||{};return c[u.MULTI_CHANNEL_SELECTION]=c[u.MULTI_CHANNEL_SELECTION]||{callback:function(a){if(b.engData&&(a.target||a.srcElement)){var c=a.target||a.srcElement;c.dataset&&(b.engData.multiChannelEngagementSelection=c.dataset.lpChannel)}}},c})}lpTag.taglets.baseUIOffer=function(){function c(){}function d(c,d){return b(),new a(c,d)}var e="0.1",f="baseUIOffer";return{v:e,name:f,init:c,createInstance:d}}()}();